package com.zjdiepu.www.base.core;


/**     
 * 类名称：BaseException  
 * 类描述：  异常类
 * @author xiongxiaotun  
 * @version 1.0
 */
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 7773039158178752257L;
    /**
     * 错误码
     */
    private String errorCode;
    
    /**
     * 错误消息
     */
    private String errorMsg;

    /**
     * 错误异常源
     */
    private Exception errorSource;
    
    public BaseException() {
    }
    
    public BaseException(String errorCode) {
        this(errorCode, null, null);
    }
    
    public BaseException(String errorCode, String errorMsg) {
    	this(errorCode, errorMsg, null);
	}
    
    public BaseException(Integer errorCode, String errorMsg) {
    	this(String.valueOf(errorCode), errorMsg, null);
    }
    
	public BaseException(String errorCode, Exception errorSource) {
    	 this(errorCode, null, errorSource);
    }
    
    public BaseException(String errorCode, String errorMsg, Exception errorSource) {
    	super(errorMsg, errorSource);
    	this.errorCode = errorCode;
    	this.errorMsg = errorMsg;
    	this.errorSource = errorSource;
    }

    public String getErrorCode() {
		return errorCode;
	}
	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}
	public String getErrorMsg() {
		return errorMsg;
	}
	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}
	public Exception getErrorSource() {
		return errorSource;
	}
	public void setErrorSource(Exception errorSource) {
		this.errorSource = errorSource;
	}
}